using System;
using System.Collections.Generic;
using System.Windows.Forms;
using Updater;
using TheLogWatcher.Properties;
using System.IO;
using System.Configuration;

namespace TheLogWatcher
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main(string[] args)
        {
            string startDirectory = Directory.GetCurrentDirectory();
            if (!startDirectory.EndsWith(@"\") && !startDirectory.EndsWith("/"))
            {
                startDirectory = startDirectory + @"\";
            }
            Settings.Default.StartDirectory = startDirectory;
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            try
            {
                Application.Run(new MainWindow(args));
            }
            catch (Exception)
            {
                // Catch mysterious GDI+ exception
            }
        }

        public static UpdateStarter updater = new UpdateStarter(Settings.Default);
    }
}